/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcapi.entity;

import com.easy.common.utils.excel.annotation.ExcelField;
import com.easy.core.persistence.BaseEntity;
import com.easy.modules.sys.entity.User;

import javax.validation.constraints.NotNull;

/**
 * 用户角色Entity
 * @author waylen chi
 * @version 2018-01-02
 */
public class ApiUserRole extends BaseEntity<ApiUserRole> {
	
	private static final long serialVersionUID = 1L;
	private Integer userId;		// 用户编号
	private Integer roleId;		// 角色编号
	
	public ApiUserRole() {
		super();
	}

	public ApiUserRole(Integer roleId){
		this.roleId = roleId;
	}

	@NotNull(message="用户编号不能为空")
	@ExcelField(title="用户编号", fieldType=User.class, value=".userName", align=2, sort=0)
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId ) {
		this.userId = userId;
	}
	
	@NotNull(message="角色编号不能为空")
	@ExcelField(title="角色编号", align=2, sort=1)
	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}
	
}